Added Wildcard type and sequence comparison function supporting wildcards.
Reorganized the code a bit.