cleanup of decodeTypeDefs function
taged as 0.8.0-SNAPSHOT