Renamed and added more advanced linear regression code