Update parameter handling to use structs; still global.