Refactor project for test-driven development