Refactoring the netduino app