Add docstring, modify methods and remove useless one. And unit-test for everyone.