clean up and add docs