Added some classes, functions and new switches.