Redmine#3283: minor code cleanups