fixed the signature of he constructor, set the template to use to the agavi template