Applies minor refactoring