Directory reorg and some bitfield foolery