Cleanup code according to HLint