now store CUIs as graph nodes instead of strings, with an option to return to the old behaviour
cleaned up code formatting (should be no functional changes) for PEP8 compliance