Cleanup and add docs