Added a few features of issue #107.