Rewrote the url parser

split the url parser for better extendibility and added new
functionality. Matches more urls now