Issue #926: code cleanup