Misc bug fixes and docs updates in preparation for r5