Minor refactoring of BasicBlock functions