Fixed javascript compiling and loading