Moar type fixes. This type system is ropy as hell.