Fixes #15. Second patch.

Made fixes based on comments suggested in previous patch.