Refactored in prep for test run