Refactored errors to be weighted