small cleanup, fixed some test cases