Added support for custom titles and messages.