Refactor engine. Fix Flp.