refactoring and simple test of phylografter