ring can now detect rings in disconnected graphs. Added empty check to Fifo. Various tests.