More json stuff
Last preparations before converting html methods to json methods