Minor fixes and rewrites