Cleanup some redundant code