Added missing end for if that broke the build
Updated tables to add indices (note: build is broken)
Fixed a bunch of issues with the sensor types that were keeping tests from passing