remove unused code; make it work with swatchbook