documentation and tidy wip