Fix warnings of JShint and fix a bug with loader JS

Change-Id: I205974a6f6c60ff764ec48755e97467fe9701965