Fixed various bugs created up when merging the restful-api branch
js style
Merge pull request #297 from CalPolyIEEE/hotfix-restful-api-bugs

Hotfix restful api bugs