Moved all response output to views.