Porting Notes_Logic in progress