Updated read code slightly.