GG working

Added basics for JSON stuff, graphml output. Broke the code up a little bit for better organization.