Removed $ from regexps and a typo line