Refactored compiler.c