Added enum Phase and getCurrentPhase