Added lots of classes and functions.