- re-added some missing function

- added notifications (not complete yet)
- changed some formating and reordering of the code