Moved JS files from bottom <body> to <head> so that jquery can be accessed from within templates.