Improved Daemon

I've improved the daemon behavior and added an init script.