Added tests
Improved schema