Refactored ph.hpp to detail and algorithm.hpp.