Added preamble test. Fixed skipping of last code in header.