Added dependencies, fixing table schema, and minor fixes
of templates.