First support for alert notifications; minor other features

See the individual commits for logical chunks.