Fixing Issue #27. Adding a few tests.