Removed defer on script and fixed JS namespace bug