Switched from ajax to using websockets