Removed deprecated and legacy code