added comments and refactored network.scm