fixing some bugs that only present when loading old localStorage data
adding a quick'n'dirty demo for exercising BFS end-to-end