Runs and Scans with Applications