Re jigged the loading js