holy piece/phalanx refactoring batman