Added web API controller and moved (also modified for this purpose) JSON generating methods into it.