Added Contracts for interfaces.

Added more support for generics.