Moved shared variables to one place
Removed TemplateManager and moved responsibilities to PixelTemplate
Simplified PaletteManager