Cleaned code with full computaions of all the necessary sensitivities.