Got rid of unnecessary code