Split -] fnmatch case into two cases
Use more verbose names for brace regexes
Add comment explaining i and n
changed variable naming
fix a mess