Removal of code redudancy