Move script tag to end of body to ensure DOM is ready

Scripts should go right before the closing `body` tag to ensure the DOM is ready. This removes the need to do any DOM ready stuff before interacting with it.