wip: cleanup, add docs