Refactor (lib)