Can we make the close() function a member of the Messages class, similar to the `cleanMessages` function? Then we should be able to use `this.element` to remove the alert.