Fixed non-persistence of some data structures. Known issues: One node seems to be continually overwritten, algorithm seems to make errors when deciding what its new location is