Mostly got error code definition macros working.