Made update function more consistent with other parts of the library while retaining flexibility.