Added template, moved template to separate file, refactored OPTIONS.
Changed style wrt option parsing.