more Template stuff and lots of changes to DbObject, see changes.txt