Refactor countdown to a service