Close #159.

Finished the implementation.