Refactored PhaseManager and Phase