Moved business logic outside of the view;