Some type signatures and minor tweaks.