Extract api/reader.go. No tests yet