Removed deprecated and redundant code