Refactor sensors