Reuse the same document style implementation.

This facilitates customized filters and selectors.

As a bonus removed a couple of deprecated use of JsRegexp
Merge pull request #320 from manolo/mcm_visible_fix

Reuse the same document style implementation.