Formatting and preamble addition