Refactoring - Performance improvements