Improving code in bobbles builder