Code refactoring

model.js -> control.js
fix bug the status of a sensor is not changed.