Fixed some issues, added more tests and nice readme