Some redundant code removed