Removed some defs and replaced with constants.