Some cleaning and commenting