Some cleaning and more documentation