From http://stackoverflow.com/questions/510972/getting-the-class-name-of-an-instance-in-python