Many constants have been substituted with the newly added in trunk. Did some changes to the mode computation routine, mostly the starting guess.