Track size by JSON encoding and then taking length. Fixed travis. Updated tests