Refactor constants

I think this is now ready to be merged.
I believe this file can now be deleted