Better type defaults and detection