#6210: Refactor javascript includes to improve load time