Cleanup and comments on existing code.