Remove dublicated code.

Related to #28