Refactored code to place production code and tests in different packages