Contiki Refactoring