Improving redbus code