Refactor based on moved lib to libs