Added database and JSON returns