Refactoring service to be structured, then real implementation.