David Lamkins read loop and command-line patches