Create repair.cpp

Implementation of repair.h