Internal Credit Risk Models: Capital Allocation and Performance Measurement