Minor changes, bug fixes, threshold adjustment