Added some tests and cleaned a bit