Cleaned up Type.hs. Added documentation.