Changed how the library is initialized, so that extra buttons can have
access to the onTitleChanged event.