Completed type_pair and minor changes