devcode backup

dev dev dev.
fixing up GATE functionality.