Gate: Added final statement to arguments. Better handling for case insensitivity.