Moved linear regression code