massive directory reorg and refactor