Clean and refactor into distinct services