Some more functions and some class/method changes.