Cleanups of redundant code