Added some classes and functions