Keep view-altering logic in view