Reorganize service functions