Refactoring templates and os specific file installation