Another big speed boost by completely eliminating vector operations in the main loop