Refactor bbs controller