Updated commenting and error message.
Updated error message for zero valuations and costs.