Removed argument dir from method printNumberOfClasses(self). Cleaned up code.