Added new tests to refactored code