rearrange front end using a controller and centralized layout