Removed unused code in core