Fixed update bug by extracting code into separate docs.