some code reorg and file renames