Added test sets and fixed errors