#60 prev updates and handling for webapp
#61 added prev sensor and refactored