Move anim views to be defined earlier, befoore they are used (e.g. by cursors)
Use dbids instead of idxes in cursors and characters