cleanup code, detect local rebuilds