Horrible json and hackery