REFACTOR: Removed duplicate code