Added some more javascript game functions