Remove deprecated classes and small improvements to flyweights