select: BH-templates refactoring

Close #1020