Removing dead code and removing dependency with KEY from electrum code