added default format json to routes and changed to render json for controllers