Cleanup calls to set_custom_vars()

Moved to passing a hash as one of the parameters to make things a bit easier to work with.
Merge pull request #236 from awiddersheim/cleanup_set_custom_vars

Cleanup calls to set_custom_vars()