Completed update to allow for dismissal callbacks - fixes #6