Better separation of the palette functions.