Fixed a file length bug (unsigned int), removed extraneous code