Removed unneeded code.
Added KMP algorithm.
Removed newpage.