Fixed tests, updated docs for phosphokappa distribution, improved deltaMax performance
fixed some code structure