Added "Update and Close" functionality.