Update engine.rb
Update engine.rb

I've done a bit more of refactoring.
samchen2009/impressionist,firmanm/impressionist,firmanm/impressionist,charlotte-ruby/impressionist,charlotte-ruby/impressionist,samchen2009/impressionist,firmanm/impressionist,guodongme/impressionist,guodongme/impressionist,charlotte-ruby/impressionist,guodongme/impressionist,samchen2009/impressionist