Improved 13, 14 and 16. Added tests 21, 22, 23, 24, 25 (plus all dependencies).