refactor for threading

Yeah. Xcode fails at copy/pasting closures unless C-style curly braces are used.