Preliminary user controls code