Library type opotion functionality implmented and tested