refactored Network saving and loading
fixed bug in DeviceType