Some minor refactoring for preamble detection.
Minor documentation fixes.