better option handling and more locals
Merge pull request #2 from dpitre/localization

better option handling and more locals