Refactored lambda in engine classes