Yi - support constuctor parameter with interface type; remove unused code