Some improvements, switching to AVX