delete unused styles and references