Moved query and forms js to head tag instead of body to have it ready on html load.