Added null pointer checks, better header system, and better generic compilation system (it tracks the parserstate for each file now, no more double-parsing stuff)