Get rid of redundant code