Refactoring and lbr support