Code cleanup part 1.
Comments and code clean up.