fixed som js issues and hopefully adding the JS files