Improved fault and sentence generation