- updated for Xcode 6 Beta 6 to remove calls to local functions from within a local function; using a closure instead
- if obscure runtime errors are encountered, try going to the product directory and manually removing all the files there as Product > Clean does not seem to do a good enough job