Replace `inject` to `each_with_object`
Remove support for Ruby 1.8.7
Convert version constant to class