Replace cli-options with get-cli-options fn.

Fix #12.
Fix typo in No layout registered with key expection.
Load layouts in markdown parsing spec.

Otherwise it cannot run on its own. Refactor a bit too (DRY it up).