Normalize weight sum
Add repair algorithm