Cleanup of location.js source for merge