Modified network code to make it easier to add values, added dir.