Add preamble and macros