Add a long-overdue test for some basic functionality.
Try new interface for computing gradients in parallel. Contributes to bug #20.