add API mode + tests and set jshint to 2 space for a tab