Fixes.

This is the first commit of this that works at all.