Remove duplicate code (:shame:)