refactor templates to use a base template and extend ft