Fixed XML bugs and started with JSON