No need to use regexp to compare equality
Slight optimization
Formatting cleanup