Incode coupling calculation from tracy 2 into tracy 3, and also add some comments about the functions.