Fixing Errors in filtering procedures based on input from SamR. Still
untested