Minor bugfixes and interface changes.