URL Processing 
@param {string} url
@return {{base: string, params: string}}
function parseUrl(url) {
    var parts = url.match(/^(.*?)(?:\?(.*))?$/);
    return {
        base: parts[1],
        params: getParams(parts[2] || ''),
    };
}