Some cleanup of the code: Remove several more unused routine arguments and avoid passing larger data types when smaller ones are enough.