- added some code for managing resources like fonts and palettes