Move each build phase out into a separate class.