Reorder some notebook cells so that it can be run sequentially