client-side: template refactored into single file