Cleanup Unit tests and added tests for session api