Add structure for notes in order of time

Refactoring