Better abstraction in the template