replace hard-coded error messages with error message factory items
tested as many as I could - this seems to be working