modal id now in settings. Some fixes for double binding of events