Clean up and formatting

Removed unused variables and corrected RegEx formatting to keep
consistency.