Clean up code, separate services