Cleaning up, and adding docs