Refactor minor changes to block.js