Assorted refactoring - add a texture region to the palette manager and dispose more stuff.