migrate most of demo.js's render functionality into pyramid-march.js