Moved some code from common.py to constants.py