Refactored parsing of macros
Fixed fatal error for unknown macro