Makes Toolbar API class based again to future proof it

At the moment if we ever want to add new parameters to the toolbar api there is no backwards compatible way doing so. This allows this again.