update with various fixes
lots of improvements