Implemented suggestions from HLint.