Added 'template' and 'data' options to BaseModel constructor