Code cleanup and minor changes.
2.2.7