Improve code to pass jslint
Fix behavior for competing css-rules and style attributes