Revert "Minor tidy-up around type and annotations."

This reverts commit d1e5c1adb175104e95db578d8b3001c906f247ea.