more refactoring, improved nesting for notations