shortcut to mapConstants, cleaned up some JS