Added support for multiple classes
Updated tests