Finished implementing winding corrections.
Some cleanup.