Cleaned up some APIs a bit.