Local optimization fixes & order of operation in algorithm changed & selection change