fixed the hard coded distinction between a and w directories, also am now passing the file name into parse_table so as to accurately account for instances where the end of the of filename is not 00
cleaning up