Added type constraints.
Two test sets added.