Removing some untyped stuff and making it typed.