Moving logic to Service