[CLEANUP] Replace the defined constants with class constants.

Constants defined via define() pollute the global namespace. This change
converts them to class constants.