Fixed the command-line/options management code
Added a real template for SPM