added a few tests/clean up