Implements update() and form() functions