Added suppor for filterFunction with callback. Fixes #4