refactor logging
Rearrange so that default values are passed in as a variable
Add edit of tasks