restructured REST API and JSON handling from it