intermedia rework
code reorg continued
reorg continued
reorg continued
reorg continued
reorg continued
reorg continued
reorg continued
code reorg (mostly complete)