fixed some of the client side javacript errors. some listeners are still not working properly.