-Algorithem and some tiny changes.