Repository code cleanup