Split up starting background service. Removed some unused vars