Refactored some tests to be cleaner