ExecuteCommand method in Engine refactored, fixed bug in Engine