some edits suggested by HLint