Let consts and data be shared by server and client?

This is kind of a hack; maybe we should do it better at some point...
a bit of further cleanup