Clean up GraphSON code a bit.