Added borrowed linear regression function, fixed multiple fatal equation finding bugs