Latest changes for issue #5.