Refactoring controllers and modules to fit the ngbp design