remove lots of unused var and a unused dependency