Tests + some fixes for adjustTypes()