Went through test cases and fixed bugs