Adding rest stuff and sql stuff in rest/