Daemon review, formatting changes and small code adjustments, relates to #171