Ditch some craziness and add proper daemonizing.