Fixed JSON problem, updated tests