Refactor: base template