Refactors JS code and fixes bug with bad service names

Some services like USGS/CMGP have illegal characters in their name which
causes the routing logic to fail and undefined behavior in the code.
This commit creates a static map to translate from a url-safe version to
the readable version.

The static map is defined in the service endpoints and in
servicemappings.js