Restucture Phire controllers and views