Fix go vet errors.
Add a few package docs and clean up exported interfaces.
Clean up and factor base package.
Rename base package to graph.
Rename framework package to compiler.