Fixed #9. Refactoring.