Adding more tests and some other clean up