Improvements to client side code.

- Removed DOMContentLoaded event by reordering the scripts to appear
  after the DOM contents have loaded implicitly.
- Utilized jqXHR promises to know once both requests have completed.