Tidy up js loader
Tidy up js loader