Cleaning up, adding some docs.