Gate instruction and related traits refactoring