Made api prototypal for testing
Started adding mocha tests for api