Move net and dataset to structs
Move defs/prototypes to header