Refactoring Engine

Make engine to use CommandReader and validate user input.