Re-designed LinearGP and related code.