Fixed some tests and removed unnecessary code from test cases.