Fixed some tests

code cleanup