Refactor constants

I think this is now ready to be merged.
If these values don't change based on environment, then they would seem more like constants than settings.