Added a logger
Ignore log files
Refactored and restructured engine.rb, and added logging