Factored out blocks.js from index.js.