[EHNACEMENT] Refactor js/blocks.js (let JavaScript do the JavaScript work. Don't make others to do it)