Refactor to latest Cooja