Some fixes
Adding some tests
Fixing tests