Get rid of custom error functions as they're only used once each in v2