major changes since last commit, too many to comment on