Cleaned up some Rubyisms