Added more tests and fixed a c/p bug
Added more tests and comments