Replacing global constants with class constants