moved things around.
palette works but is in need of cleanup and patching.