devcode backup

yes
loop/gate fixes

yes