Some cleaning and commenting.