Some refactoring performed