Fix sensor schema and reorder fetching fns.