Moved generate preview method to Note class