Some changes required for compliling the program. The accuracy of the results must be checked yet.