tmp patch for bug #95.
commits resulting from adding unittests.