optimization
remove code

don't used and shitty algorithms, although left some comments, maybe
some day implement a better algorithm.