Cleaned up type errors