Cleaning up some tech debt: moving more things to tuning, renaming primality.