Misc fixes and doc improvements