Desing fixes. Refactoring