Made tag filter case-insensitive. Minor reformatting regarding curly braces.