Move loading of JS to end of body tag.
Use constant for API URL