fixed some bit assignment mismatches. better dir structure.