Move some things around in SPG.
Move line search to an extra class.