First pass for bnp refactoring