Bugfix palette

Fixes #978

Also removes weakrefs, since I don't see their point here.
This seems like a major API change.....