(WIP) Basic graph construction

I need to clean this up and add more validation, etc.