More cleaning and documentation