Gets rid of redundant code