Fixed ordering on getSensors
Data encoded/decoded at server/client
Threading at server + database changed