Added update, fixed tests and docs.