Remove dead code in core
Merge pull request #1789 from ke-yu/code_cleanup

Remove dead code in core