substantial clean up of the code. no new features.