did some cleanup and added a synchronous js loader