Make base template more generic and make it configurable.