This should take care of issue #4, but there are no tests yet.