Splitting out calculations into a service.