Fixed constants for Ruby 1.9, improved code readability