Fixed upload attachments not hiding upload input.
Moved script tags to bottom of html page. Re-did style of require calls to be more readable.