all: remove some unused funcs and variables Upstream-commit: 40dc921da21e4f1fd165f1d7da87d600e3eb8609 Component: engine