#673 - major cleanup