Code organization, added known network support, added DEBUG sections