big reorg, created HelperRoutines.cpp