Clean cleanup + performance boost + remove unnecessary code

I change some minor things. I made this in 10 minutes so if you want i can spend more time to make more.