major reorg of code; moved many things into Tool implementations