Code clean up

I`ve didnt check that everyhing is still working,