Fixed taking lambda by value
Merge pull request #1290 from dvvrd/2d-model-code-improvement

2D Model Refactoring Stage 2