refactor lib folders