Removed haskell pivot, applied cppcheck advice.