cleanup, begin graph functionality + tests