organize options, fix template variables