Docs: tweaks, code reorganization