Recreate args dictionary with str() arguments, use closures

Fixes #776