remove slag, fix typing on some stuff