Fixed some minor issues and tried to fix the test classes