Moved some common code in url_lib_factory which may be used for grooveshark api too.