more changes to use smaller functions
removed some invalid rows from data; updated code to fit standard regression models
small tweaks; need to repair plotcat