Formatting and removed duplicate call to file reading.