Code clean up in sensor manager