Refactor Renren functionality into a self-contained module