Added KMP
Fixed a few things