Finished replacement method for duplicate code
Cleaned up logic inside repair circle statements