Added tests

And some TODOS