Improved code style of baseengine.rb