Implemented first version of the engine