minor doc updates and reorg of code