clean up, add docs