fixed stack trace filtering; added some tests