add class BiquandleGenerator and make some optimization steps