cleanup reorganize and pagination