Extracts class Read to be used in external applications. Adds testread which compiles to ./read