Group arguments into structures and move fee calculation to separate function