Improved commenting, cleanup.