Added db and template support