Adds commenting, naming, style fixes.