Cleaning up by removing redundant code