Add various note types to archive. Refactor. Improve record checking functions.