Minor test case changes and code update