Debugged kink and threshold, added getkinktime and getthreshholdtime.