enums from C++11 instead of protobuf where neccessary; connection initialisation cleanup; Device.* rewritten