Moves JSON API into new controller