Fixed some errors around setting styles and removal of style properties.