Move some servicey code to service out of GUI