Fixed typo.
Refactoring.
Added test for ..