Refactor and document code in quad/xsdk_workspace/real_quad/

Description of the problem

Much of the code in the real_quad/ directory is not well commented/documented and could use a refactor

Proposed solution

Go through the files in quad/xsdk_workspace/real_quad/ and document and refactor them