Cleaning and commenting.
Cleaning up variable cofactor section.