refact the kooboo common libraries.
api