fixed and refactored some more tests