refactored NIFFile parse to get better code/data seperation