Clean up and add additional documentation