Add preamble handler to code.