NotesContract optimization