Made few refactoring