Cleanup redundant code