Fix how macros are expanded and modules are parsed