Changed from @dom_output to modifying the Nokogiri object

Eliminates duplication of elements, but nested elements aren't properly being targeted for application of styles