Added buttons that toggle gates