resturctured arch, debug buttons added