Thermal degradation of polystyrene