Added api stuff
Fixed typo in main.js