Denis1

lots of fixes... see commit comments