Move macro methods into a separate module