correct handling of daemonisation and logfile-reporting
confirm to new json convention
add a cleanup script. Use with caution!