wsgi scripts now support updated db schema. Added sensor factory.