bmods refactoring