More intelligent string conversion in generated files + commander refactor bug fix

- closes #20