refactory libs directory.