Fixed BBuilder and added testing in main