Cleaned up some redundant code