Remove debug coprocessor and clean up teach code