more refactoring, model not clear yet
indenting diagnosis msgs
enough refactoring for now...
reorganized common utils
ignore emacs garbage