Merging local changes in, improving the test routine. This effectively
closes #14.