Edited json output, removed bug which didn't assign charge to last atom