Main bits, daemonize stuff