Re-factored business logic in template field to the template factory