Added daemonization support, fixed pool exiting bug, pep8