Fixed preferences size. Reworked most of the SwatchView code and restored color box in preferences. Various rework and code style fixes.