Rewrite of motor logic
more PANIC tweaks
Fixed bug in un-panic logic.