added comments, slight refactoring, changed string enum pattern to enums for url-patterns-regexps