Some refactoring!!