Structurize options.js
Making progress towards new implementation. The first step is re-organize
the structure.