Improving code of redbus