Remove unused var and fn