BUG-5626: use lambdas, Runnable and Consumer instead of Procedure