Added tests for session API before implementation.
Refactored schema to fit new design.