Added lots of fold markers to chain.cpp
More work on the infinite chain.