Documentation improvements

Clarified the documentation, improved readability, avoid references to
standalone as "background" (the framework is "standalone").
add newlines to code files
fixup markdown formatting