Fixed a bug with classes and added the -r option