Major rewrite of reader code to allow start-stop operation