Cleaned up redundant code.