remove getSubPalettes from Palette
unit testing and bugfixing