LOTS of clean up, and added support for missing OBS callbacks