JSON IO: Fixed support for XList multiple elements
Cleand and fixed code for thesis writing