Moved error messages out of #defines and in a separate class
First stab at removing the #defines for error messages and cleaning up the error handling code a bit