refactored code, reordered unit tests and added utils
added RegexNode and refactored NodeTypeAsserts