Template implementation. Selector refactor.