speed benchmark, minor cleanup