Minor changes, and the first of the new functions