Fixes to make notes plugin functional again
Various core fixes
Merge remote-tracking branch 'upstream/master'