sensors plugin: While I was at it I reorganized the code a little so it's easier...