Fixes #90.  Also implements a piece of #108 (making fields readonly)