Moved errors to defines, shouldn't this just be a template?