minimizing template by introducing DimerSubspace and DimerSubspace_base.