Completed update to allow for dismissal callbacks