Getting rid of unnecessary code