Improved Regex expressions and better unit tests