Update addsensor

@davras please review.

Got chance to submit the changes to addSensor to run logic as a servlet. Also took the opportunity to do some spring cleaning.