Small tweaks / bugfixes from poking around code today.