Added support for auto registering constants.