Replace console.log calls with process.stdout and process.stderr
Fix error naming
Replace new Object() call with literal
Prevent section definitions within macros