Cleanup
Make gate ids case insensitive.