Lots of working fixes