Minor changes...
Now works with classes...