Changed the scope of some functions in  NoteControler