Api logic updated
Merge pull request #46 from fiuba/fixes-for-api

Fixes for api