optimization interface now runs through, next step - code cleanup and reorg