Fixed input issue with json being imbedded and updated routing for api