Introducing Phake and refactoring tests