Cleaned up tests a bit.
Tests now generate a Json result and they are saved to a file.