Fix for issue #108; a little cleanup.