Cleaned up the single-thread and openmp code a bit.
No logical changes.