Added autosave for comments and did some refactoring.