Remove surplus debug logging from controller; split out WebApiController for AJAX requests
Tidy up controller