reorg, style changes, cleanup