Code for new wide design

Removed testing statements now that switches work. New algorithm for
error signal, not fully tested yet.