Code review and cleanup.