added some test cases and did some cleaning up