Removing unneeded memcpy in readHeader(), also adding in a validate() in readHeader() and cleaning up comments