Tidied up the logging and Trace output
Daemonising starting to work - more work required
Removing some var_dumps