improvements to the editor, added ratios and facts; some refactoring