Reorganise all lib folders and do some change to API