Completing standalone api and writing tests
completed api and tests for standalone mode