Fix some stuff, add more tests and write chained update support