Added parameter for penalty to applyKnownSolution(), some formatting.