Fixed a bug with finding sector flats, started texture IO preparation,
moved some enum/classes around