Fixing minor complexity issues reported by code climate