Adjust main so service operates as a background process.