refactor Constant class. Added a few utility methods