old debug code removed
some minor changes to feedback control