Fixed class

I made fixes, please tell if everything is fine.