Finished cleaning up code

This is the first commit in a long time that compiles without errors. I have had to make a lot of changes to the basic code to deal with the virtual functions, unnecessary code and errors in my own initial judgement.

The fun is that the code compiles so now I can start to make it work like an actual network simulator.