Cleaned-up and added defines.