Minor changes. Refactoring.