refactor for threading

Please follow coding standards: _ prefix for arguments, & stays on left side.

They're very clearly set out in /CodingStandards.txt.