Get rid of some redundant code