Code review fixes, test-case  clean up