Small changes from abandoned light matter reader branch.

These are a few small (syntactic & the moving of one function) changes from the abandoned light matter reader branch. These changes will be used from the light matter code.

Fixes #276