more work on api ; added ability to create apps ; added tests