make error tables const and separate header file