Added task tests. Fixed errors.