Cleans up key graph