Reorganize lib