Fix: Conflicts and remove duplicate code