Improvments after comments from the teacher

I have improved the code after some comments from the teacher. I use
some unnecessary things that i have removed