Refactored out some helper functions.
Refactored create_new_note to be a bit cleaner.