Cleaned up preamble handling.