Issue 578: code review changes