Refactor constants

I think this is now ready to be merged.
Can we remove this comment? It's confusing.