cleanup preamble