Optimized extendPalette method

str_replace is a bad idea to extend a palette cause it replaces all found items. If you like to replace headline it will replace other words too (like subheadline).