Redid all logix on this to address several problems