Code pruning, updated network lib slightly (added ConnectToMaster function)