Cleaned up some stuff. decided not to use graphs