Validation done in the writing to file. Errors corrected in the Terrain class. Comments added for better perception of the code.