Tweaked engine.rb:wq