Removed some redundant code