major code reorganization, more automation