Refactoring in various places using HLint