Refctor code moving constants.