Lots of updates

See issues comments for various changes.