Better vector calculations, level ending