Better Url parsing and handling