Cleaning up some redundant code