Change restFactory building - it's now module style, not js.