move block.js to its own file