Reformatted backend k2.js