Factoring out style-applicator.js to enduser.
Fixing unit tests for style application.