Tweaked classification params and logic, added more debugging info.