All tests pass. Need to make code neat and test in mininet