General tweaks and fixes.