added a lot of updates including test fixes