Revert 31df6bb..7114e5f

This rolls back to commit 31df6bbdd62ab4ef2e456b022ba9685cb88028a2.
remove unused codes