Second Edition. Code improvements.