Update server API to mvc pattern