Update for begin/end actions

Also take advantage of libdaemon