Refactor - Change code to use object for sensors