Changed a lot of js around
Ready for test on live