Did more testing, and changed mallocs. I believe the bug in salient algorithm is now fixed.