Move JSONy stuff to statserver