Removed some of the redundant code