Changed graphtest.c to use dictionaries

rec() should be much faster now.