Added a lot of javascript api's. Nail is now playable