update / fix m5nr api, tools, and backend code