Repository fix and clean