Finished the initial update function.